package com.jxstyle.modular.service;

import com.jxstyle.core.base.BaseService;
import com.jxstyle.core.common.page.PageInfo;
import com.jxstyle.modular.entity.Customer;
import com.jxstyle.modular.entity.Role;
import com.jxstyle.modular.mapper.CustomerMapper;
import com.jxstyle.modular.mapper.RoleMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
public class CustomerService extends BaseService<CustomerMapper, Customer>{

	@Autowired
	private CustomerMapper customerMapper;

	public PageInfo<Customer> page(PageInfo<Customer> page){
		Map<String,Object> map = new HashMap<>();
		map.put("page", page);
		List<Customer> list = customerMapper.findList(map);
		page.setRecords(list);
		return page;
	}
}
